﻿using QueryZJK.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QueryZJK.Models
{
    public abstract class Regen_Base
    {
        protected const string SELECT_TEMPLATE = "SELECT {0} FROM {1} WHERE {2} ";

        public abstract string GetSelectStr(QueryParameters param);


        public static Regen_Base GetMatchRegen(DJLX djlx)
        {
            switch (djlx)
            {
                case DJLX.BDC_REGN_CF:
                    return Regen_CF.Instance;
                case DJLX.BDC_REGN_YG:
                    return Regen_YG.Instance;
                case DJLX.BDC_REGN_DY:
                    return Regen_DY.Instance;
                case DJLX.BDC_REGN_YY:
                    return Regen_YY.Instance;
                case DJLX.BDC_REGN_FWSYQ:
                    return Regen_FWSYQ.Instance;
                default:
                    throw new ArgumentException("has no match djlx");
            }
        }
    }
}
